package com.rh.bmw4s.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.rh.bmw4s.R;
import com.rh.bmw4s.bean.BrandBean;

/**
 * Created by Administrator on 2017/9/26.
 */

public class CategoryContentAdapter extends ListBaseAdapter<BrandBean.BrandsBean> {
    Context context;
    public CategoryContentAdapter(Context context) {
        super(context);
        this.context=context;
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_category_content;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        BrandBean.BrandsBean bean = getDataList().get(position);
        ImageView imgCar=holder.getView(R.id.img_car);
        Glide.with(context).load(bean.getLogo()).placeholder(R.mipmap.logo).into(imgCar);
        TextView  tvName=holder.getView(R.id.tv_name);
        tvName.setText(bean.getModel_name());
    }
}
